﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    xmlns:Spritehand_PhysicsBehaviors="clr-namespace:Spritehand.PhysicsBehaviors;assembly=Spritehand.PhysicsBehaviors" 
    xmlns:pb="clr-namespace:Spritehand.PhysicsBehaviors;assembly=Spritehand.PhysicsBehaviors" 
    x:Class="DemoBehaviors1.ucBlock"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" Width="30" Height="30">
    
    <Canvas x:Name="LayoutRoot" Width="30" Height="30">
        <Canvas x:Name="cnvBlock" CacheMode="BitmapCache" Height="30" Width="30">

    		<i:Interaction.Behaviors>
    			<pb:PhysicsObjectBehavior BoundaryElement="rectBlock"/>
    		</i:Interaction.Behaviors>

    		<Rectangle x:Name="rectBlock" Height="30" Stroke="Black" Width="30">
    			<Rectangle.Fill>
    				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    					<GradientStop Color="#FF6786EE" Offset="0.004"/>
    					<GradientStop Color="#FF0B2478" Offset="1"/>
    				</LinearGradientBrush>
    			</Rectangle.Fill>
    		</Rectangle>

    	</Canvas>

	</Canvas>
</UserControl>
